Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source maps: leave source filename intact, add hash to end #142

Closed
wants to merge 1 commit into from

Conversation

cguinnup
Copy link

@cguinnup cguinnup commented Dec 13, 2016

PR to fix #141

Simply adds a hash to the end of the existing source filename, rather than completely overwriting the source filename.

Example source file:
src/sub/file.coffee
Previously appeared as:
md5_hash/compiled_destination/file.js
Now appears as:
src/sub/file.coffee?version=md5_hash

Admittedly, adding the hash to the filename will pollute the console somewhat. But long filenames are truncated with '...' in the console & easily ignored. Whereas putting the hash in the path made source browsers nearly useless, since each file appeared in its own unique folder.

@milankinen
Copy link
Owner

Very good, thank you! I'll merge and install this later today

@cguinnup
Copy link
Author

I have a better idea: Only append the hash to source map filenames when a script is reloaded. That would drastically decrease the appearance of hashes in source filenames... but I can't import or require 'convert-source-map' in reloading.js, can I?

@milankinen
Copy link
Owner

Yeah sounds good! You can modify this PR if you like. Also could you use development base branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source map path/filename issues
2 participants